home *** CD-ROM | disk | FTP | other *** search
/ Total Network Tools 2002 / NextStepPublishing-TotalNetworkTools2002-Win95.iso / Archive / Misc Servers / Zope.exe / DTML-TREE.STX < prev    next >
Encoding:
Text File  |  2000-10-31  |  3.8 KB  |  119 lines

  1. tree: Inserts a tree widget
  2.  
  3.     The 'tree' tag displays a dynamic tree widget by querying Zope
  4.     objects. 
  5.  
  6.   Syntax
  7.  
  8.     'tree' tag syntax::
  9.  
  10.       <dtml-tree [VariableName|expr="VariableExpression"]>
  11.       </dtml-tree>
  12.  
  13.     The 'tree' tag is a block tag. It renders a dynamic tree widget in
  14.     HTML. The root of the tree is given by variable name or
  15.     expression, if present, otherwise it defaults to the current
  16.     object. The 'tree' block is rendered for each tree node, with the
  17.     current node pushed onto the DTML namespace.
  18.  
  19.     Tree state is set in HTTP cookies. Thus for trees to work, cookies
  20.     must be enabled. Also you can only have one tree per page.
  21.  
  22.   Attributes
  23.  
  24.     branches=string -- Finds tree branches by calling the named
  25.     method. The default method is 'tpValues' which most Zope objects
  26.     support. 
  27.  
  28.     branches_expr=string -- Finds tree branches by evaluating the
  29.     expression.
  30.  
  31.     id=string -- The name of a method or id to determine tree
  32.     state. It defaults to 'tpId' which most Zope objects support. This
  33.     attribute is for advanced usage only.
  34.  
  35.     url=string -- The name of a method or attribute to determine tree
  36.     item URLs. It defaults to 'tpURL' which most Zope objects
  37.     support. This attribute is for advanced usage only.
  38.  
  39.     leaves=string -- The name of a DTML Document or Method used to
  40.     render nodes that don't have any children.
  41.  
  42.     header=string -- The name of a DTML Document or Method displayed
  43.     before expanded nodes. If the header is not found, it is skipped.
  44.  
  45.     footer=string -- The name of a DTML Document or Method displayed
  46.     after expanded nodes. If the footer is not found, it is skipped.
  47.  
  48.     nowrap=boolean -- If true then rather than wrap, nodes may be
  49.     truncated to fit available space.
  50.  
  51.     sort=string -- Sorts the branches by the named attribute.
  52.  
  53.     reverse -- Reverses the order of the branches.
  54.  
  55.     assume_children=boolean -- Assumes that nodes have children. This
  56.     is useful if fetching and querying child nodes is a costly
  57.     process. This results in plus boxes being drawn next to all nodes.
  58.  
  59.     single=boolean -- Allows only one branch to be expanded at a
  60.     time. When you expand a new branch, any other expanded branches
  61.     close. 
  62.  
  63.     skip_unauthorized -- Skips nodes that the user is unauthorized to
  64.     see, rather than raising an error.
  65.  
  66.     urlparam=string -- A query string which is included in the
  67.     expanding and contracting widget links. This attribute is for
  68.     advanced usage only.
  69.  
  70.   Tag Variables
  71.  
  72.     tree-item-expanded -- True if the current node is expanded.
  73.  
  74.     tree-item-url -- The URL of the current node.
  75.  
  76.     tree-root-url -- The URL of the root node.
  77.  
  78.     tree-level -- The depth of the current node. Top-level nodes have
  79.     a depth of zero.
  80.  
  81.     tree-colspan -- The number of levels deep the tree is being
  82.     rendered. This variable along with the 'tree-level' variable can
  83.     be used to calculate table rows and colspan settings when
  84.     inserting table rows into the tree table.
  85.  
  86.     tree-state -- The tree state expressed as a list of ids and
  87.     sub-lists of ids. This variable is for advanced usage only.
  88.  
  89.   Tag Control Variables
  90.  
  91.     You can control the tree tag by setting variables.
  92.  
  93.       expand_all -- If this variable is true then the entire tree is
  94.       expanded. 
  95.  
  96.       collapse_all -- If this variable is true then the entire tree is
  97.       collapsed.
  98.  
  99.   Examples
  100.  
  101.     Display a rooted in the current object::
  102.  
  103.       <dtml-tree>
  104.         <dtml-var title_or_id>
  105.       </dtml-tree>
  106.  
  107.     Display a tree rooted in another object, using a custom branches
  108.     method:: 
  109.  
  110.       <dtml-tree expr="folder.object" branches="objectValues">
  111.         Node id : <dtml-var getId>
  112.       </dtml-tree>
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.